<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text">
<script>
    const input = document.querySelector("input")
    input.onkeyup = function (e) {
        console.log(e.target.value)
    }
</script>
</body>
</html>